<?php


namespace app\api\controller\v15;


use app\api\controller\v13\Auth2;

/**
 *三方app
 * @version 1.10.2
 * Class ThirdApp
 * @package app\api\controller\v15
 */
class ThirdApp extends Auth2
{
    /**
     * 获取三方app信息
     * @return \think\response\Json
     * @throws \Exception
     */
    public function getThirdInfo()
    {
        $id = input('param.id/d', 0);
        $data = (new \app\common\cachemodel\ThirdApp())->getThirdInfoFromCache($id);
        if ($data)
        {
            $arr = [
                'android_package_name' => $data['android_package_name'],
                'ios_package_name' => $data['ios_package_name'],
                'copy_content' => $data['command_text'],
                'command_text' => $data['command_text'],
            ];
        } else
        {
            $arr = [];
        }
        return show(200, '获取成功', $arr);
    }
}
